package com.bkgy.modular.qms.controller;

import com.alibaba.fastjson.JSONObject;
import com.bkgy.modular.qms.service.impl.QmsServiceImpl;
import com.bkgy.sys.common.entity.ResultData;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author ZhuHongKai
 * @version 1.0
 * @ClassName QmsController
 * @date 2022/12/14 11:15
 */
@RestController
@RequestMapping("/qms")
public class QmsController {
    @Resource
    private QmsServiceImpl qmsService;

    @PostMapping("/getQmsData")
    public ResultData getQmsBlobData(@RequestBody JSONObject jsonObject) {
        String volumeNo = jsonObject.getString("volumeNo");
        String width = jsonObject.getString("width");
        return qmsService.hotRollingBoldData(volumeNo,width);
    }

    @PostMapping("/getBxFindData")
    public ResultData getBXFindData(@RequestBody JSONObject jsonObject) {
        String volumeNo = jsonObject.getString("volumeNo");
        String width = jsonObject.getString("width");
        return qmsService.getBXFindData(volumeNo,width);
    }
}
